﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IPC.Communication.Core.IMessage
{
    public class EFORTMessagePrevious : INetMessage
    {
        public int ProtocolHeadBytesLength
        {
            get
            {
                return 17;
            }
        }

        public byte[] HeadBytes
        {
            get;
            set;
        }

        public byte[] ContentBytes
        {
            get;
            set;
        }

        public byte[] SendBytes
        {
            get;
            set;
        }

        public int GetContentLengthByHeadBytes()
        {
            return (int)(BitConverter.ToInt16(this.HeadBytes, 15) - 17);
        }

        public bool CheckHeadBytesLegal(byte[] token)
        {
            return this.HeadBytes != null;
        }

        public int GetHeadBytesIdentity()
        {
            return 0;
        }
    }
}
